package com.yy.watchmen

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.yy.watchmen.utils.FloatWindowPermissionUtils

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<View>(R.id.btn_start).setOnClickListener {
            if (!FloatWindowPermissionUtils.commonROMPermissionCheck(this)) {
                FloatWindowPermissionUtils.requestPermission(this)
            } else {
                WatchmenFloatWindowManager().show(this)
                finish()
            }
        }
    }
}